package com.explorati.design_pattern.hybrid.specification;

//年龄大于指定年龄的说明书
public class UserByAgeThan extends CompositeSpecification {

	// 基准年龄
	private int age;

	public UserByAgeThan(int age) {
		this.age = age;
	}

	@Override
	public boolean isSatisfiedBy(User user) {
		return user.getAge() > age;
	}

}
